package ihm;

import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

import Traduction.RessourceLang;

public class panelCreationCompte extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private JLabel lblPrenom = new JLabel();	
	private JTextField txtPrenom = new JTextField();
	private JLabel lblNom = new JLabel();	
	private JTextField txtNom = new JTextField();
	private JLabel lblMdp = new JLabel();	
	private JPasswordField txtMdp = new JPasswordField();
	private JLabel lblNumUser = new JLabel();	
	private JTextField txtNumUser = new JTextField();
	private JLabel lblMail = new JLabel();	
	private JTextField txtMail = new JTextField();
	private JLabel lblPays = new JLabel();	
	private JTextField txtPays = new JTextField();
	private JLabel lblVille = new JLabel();	
	private JTextField txtVille = new JTextField();
	private JLabel lblCP = new JLabel();	
	private JTextField txtCP = new JTextField();
	private JLabel lblAdresse = new JLabel();	
	private JTextField txtAdresse = new JTextField();
	private JLabel lblExplication = new JLabel();	
	private JLabel lblNumCentre = new JLabel();	
	private JLabel lblCodeCB = new JLabel();	
	private JTextField txtCodeCB = new JTextField();

	public panelCreationCompte(ihmFenetre pFenetre) {
		setLabelText();
		this.setLayout(new GridLayout(11, 2, 5, 5));
		addEverything();
	}
	
	private void setLabelText(){
		lblPrenom.setText(RessourceLang.getLabel("panelCreationCompte.Prenom")) ;
		lblNom.setText(RessourceLang.getLabel("panelCreationCompte.Nom")) ;
		lblMdp.setText(RessourceLang.getLabel("panelCreationCompte.Mdp")) ;
		lblNumUser.setText(RessourceLang.getLabel("panelCreationCompte.NumTel")) ;
		lblMail.setText(RessourceLang.getLabel("panelCreationCompte.Mail")) ;
		lblPays.setText(RessourceLang.getLabel("panelCreationCompte.Pays")) ;
		lblVille.setText(RessourceLang.getLabel("panelCreationCompte.Ville")) ; 
		lblCP.setText(RessourceLang.getLabel("panelCreationCompte.CP")) ;
		lblAdresse.setText(RessourceLang.getLabel("panelCreationCompte.Adresse")) ;
		lblExplication.setText(RessourceLang.getLabel("panelCreationCompte.Explication")) ;
		lblNumCentre.setText("081 23 45 67 89") ;
		lblCodeCB.setText(RessourceLang.getLabel("panelCreationCompte.CodeCB")) ;
	}
	
	private void addEverything(){
		this.add(lblPrenom);
		this.add(txtPrenom);
		
		this.add(lblNom);
		this.add(txtNom);
		
		this.add(lblMdp);
		this.add(txtMdp);
		
		this.add(lblNumUser);
		this.add(txtNumUser);
		
		this.add(lblMail);
		this.add(txtMail);
		
		this.add(lblPays);
		this.add(txtPays);
		
		this.add(lblVille);
		this.add(txtVille);

		this.add(lblCP);
		this.add(txtCP);
		
		this.add(lblAdresse);
		this.add(txtAdresse);
		
		this.add(lblExplication);
		this.add(lblNumCentre);

		this.add(lblCodeCB);
		this.add(txtCodeCB);
	}
}
